#include <header.h>

int main(){

    //int fd = open("3.txt", O_RDWR | O_CREAT |O_EXCL, 0666);
    //ERROR_CHECK(fd, -1, "open");

    //int fd = open("1.txt", O_RDWR | O_TRUNC);
    //int fd = open("1.txt", O_RDWR);

    int fd = open("1.txt", O_RDWR| O_APPEND);
    ERROR_CHECK(fd, -1, "open");

    write(fd, "hello", 5);


    close(fd);
    return 0;
}

